from tools.log_handler import get_logger
from tools.config_handler import get_config
from main import dir_path
import settings



# logger = get_logger(name='log_test', filename=dir_path + '/logs/log_test.log', debug=True)

# 使用配置文件
# logger = get_logger(name=settings.LOG_CONFIG['name'], filename=dir_path + settings.LOG_CONFIG['filename'],
#                     debug=settings.LOG_CONFIG['debug'])

logger = get_logger(name=settings.LOG_CONFIG['name'], filename=settings.LOG_CONFIG['filename'],
                    debug=settings.LOG_CONFIG['debug'])


from tools.db_handler import DB
# 增加数据库的对象，后续可直接调用
db = DB(settings.DB_CONFIG)
